//
//  SheepEntity.m
//  SGF
//
//  Created by shanshan on 10-6-9.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "SheepEntityView.h"

@interface SheepEntityView(Private)

-(void)initArrow;
-(void)initKnife;
-(void)initDeath;
-(void)initDizzy;
-(void)initStone;
-(void)initLa;
-(void)initFang;

@end


@implementation SheepEntityView

#pragma mark -
#pragma mark init

-(id)init{
	CMLog(@"in SheepSprite init");
	if( (self=[super init]) ) {
		[self initArrow];
		[self initKnife];
		[self initDeath];
		[self initDizzy];
		[self initStone];
		//Set the display frame of your sprite using idle animation
		[self setDisplayFrame:@"arrow" index:0]; //display idle1.png
		//	[mySprite setDisplayFrame:@"idle" index:1]; //display idle2.png
	}
	
	return self;
}

#pragma mark -
#pragma mark init Animation

-(void)initArrow{
	CCAnimation *animation = [[CCAnimation alloc] initWithName:@"arrow" delay:0];
	[animation addFrameWithFilename:@"ck_she1.png"];
	[animation addFrameWithFilename:@"ck_she2.png"];
	[animation addFrameWithFilename:@"ck_she3.png"];
	[self addAnimation:animation];
	[animation release];
}

-(void)initKnife{
	CCAnimation *animation = [[CCAnimation alloc] initWithName:@"knife" delay:0];
	[animation addFrameWithFilename:@"xi_knife1.png"];
	[animation addFrameWithFilename:@"xi_knife2.png"];
	[animation addFrameWithFilename:@"xi_knife3.png"];
	[self addAnimation:animation];
	[animation release];
}

-(void)initDeath{
	CCAnimation *animation = [[CCAnimation alloc] initWithName:@"death" delay:0];
	[animation addFrameWithFilename:@"xi_death1.png"];
	[animation addFrameWithFilename:@"xi_death2.png"];
	[animation addFrameWithFilename:@"xi_death3.png"];
	[self addAnimation:animation];
	[animation release];
}

-(void)initDizzy{
	CCAnimation *animation = [[CCAnimation alloc] initWithName:@"dizzy" delay:0];
//	[animation addFrameWithFilename:@"ck_dizzy1.png"];
	[animation addFrameWithFilename:@"ck_dizzy2.png"];
	[animation addFrameWithFilename:@"ck_dizzy3.png"];
	[self addAnimation:animation];
	[animation release];
}

-(void)initStone{
	CCAnimation *animation = [[CCAnimation alloc] initWithName:@"stone" delay:0];
	[animation addFrameWithFilename:@"xi_stone1.png"];
	[animation addFrameWithFilename:@"xi_stone2.png"];
	[animation addFrameWithFilename:@"xi_stone3.png"];
	[self addAnimation:animation];
	[animation release];
}

-(void)initLa{
	CCAnimation *animation = [[CCAnimation alloc] initWithName:@"la" delay:0];
	[animation addFrameWithFilename:@"mei_la1.png"];
	[animation addFrameWithFilename:@"mei_la2.png"];
	[animation addFrameWithFilename:@"mei_la3.png"];
	[self addAnimation:animation];
	[animation release];
}

-(void)initFang{
	CCAnimation *animation = [[CCAnimation alloc] initWithName:@"fang" delay:0];
	[animation addFrameWithFilename:@"mei_fang1.png"];
	[animation addFrameWithFilename:@"mei_fang2.png"];
	[animation addFrameWithFilename:@"mei_fang3.png"];
	[self addAnimation:animation];
	[animation release];
}

@end
